$().ready(function() {
	// 提交时验证表单
	var validator = $("xiupass").validate({
		errorPlacement: function(error, element) {
			// Append error within linked label
			$( element )
				.closest( "form" )
					.find( "label[for='" + element.attr( "id" ) + "']" )
						.append( error );
		},
		errorElement: "span",
		  messages: {
			password: {
				required: " (请输入密码)",
				minlength: " (密码长度不能小于 6 个字母)"
			},
			querenpass: {
		        required: "请输入密码",
		        minlength: "密码长度不能小于 6 个字母",
		        equalTo: "两次密码输入错误"
		      },
			
		}
	});
});